﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Utilities;

namespace BussinessEntity
{
    public class Receipt
    {
        string _ReceiptID;
        string _customerName;
        string _customerAddress;
        string _phoneNumber;
        string _deviceName;
        string _deviceDescription;
        DateTime _dateReceiced;
        string _status;

        public List<ReceiptDetail> ListDetails { get; set; }

        public string Status
        {
            get
            {
                return _status;
            }
            set
            {
                _status = value;
            }
        }

        public DateTime DateReceiced
        {
            get
            {
                return _dateReceiced;
            }
            set
            {
                _dateReceiced = value;
            }
        }

        public string DeviceDescription
        {
            get
            {
                return _deviceDescription;
            }
            set
            {
                _deviceDescription = value;
            }
        }

        public string DeviceName
        {
            get
            {
                return _deviceName;
            }
            set
            {
                _deviceName = value;
            }
        }

        public string PhoneNumber
        {
            get
            {
                return _phoneNumber;
            }
            set
            {
                _phoneNumber = value;
            }
        }

        public string CustomerAddress
        {
            get
            {
                return _customerAddress;
            }
            set
            {
                _customerAddress = value;
            }
        }

        public string CustomerName
        {
            get
            {
                return _customerName;
            }
            set
            {
                _customerName = value;
            }
        }

        public string ReceiptID
        {
            get
            {
                return _ReceiptID;
            }
            set
            {
                _ReceiptID = value;
            }
        }


        public string TotalVND
        {
            get
            {
                long t = 0;
                foreach (var item in ListDetails)
                    t += item.Quantity * item.UnitPrice;
                return DataUtil.ChangeMoneyToString(t);
            }
        }
    
    
    
    }
}
